﻿<!DOCTYPE html>
<html lang="zh-CN" ng-app="Emergency">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>智慧管控平台</title>
    <link href="~/Assets/Emergency/css/base.css" rel="stylesheet" />
    <link href="~/Assets/Emergency/css/index.css" rel="stylesheet" />
    <link href="~/Assets/Emergency/css/bootstrap.css" rel="stylesheet" />
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <link href="~/Assets/Emergency/css/banner.css" rel="stylesheet" />
    <link href="~/Assets/Emergency/css/font-awesome.min.css" rel="stylesheet" />
    <style>
        .t_title {
            width: 100%;
            height: 100%;
            text-align: center;
            font-size: 2.5em;
            line-height: 80px;
            color: #fff;
        }

        #chart_map {
            cursor: pointer;
        }

        .t_show {
            position: absolute;
            top: 0;
            right: 0;
            border-radius: 2px;
            background: #2C58A6;
            padding: 2px 5px;
            color: #fff;
            cursor: pointer;
        }

        #worktypelist {
            margin: 20px;
        }

            #worktypelist li {
                float: left;
                list-style: none;
                color: white;
                margin-left: 10px;
            }

            #worktypelist span {
                width: 30px;
                height: 15px;
                background-color: grey;
                display: block;
                border-radius: 5px;
                float: left;
                margin: 3px;
            }

        .table_p {
            height: 93%;
            margin-top: 7%;
            position: relative;
        }

        .table_p01 {
            height: auto !important;
            margin-top: 0 !important;
            position: relative;
        }

            .table_p01 table td {
                padding: 6px 0;
            }




        .table_p table tbody {
            color: #ffffff;
            font-size: 13px;
        }

            .table_p table tbody tr:nth-child(2n+1) {
                background-color: #072951;
                box-shadow: -10px 0px 15px #034c6a inset, 10px 0px 15px #034c6a inset;
            }

        .meter-info {
            width: 16%;
            word-break: keep-all; /* 不换行 */
            white-space: nowrap;
            display: inline-block;
        }

        .meter-head {
            color: white;
            font-weight: bold;
            font-size: 14px;
        }

        .meter-footer {
            color: white;
            font-weight: bold;
            font-size: 18px;
        }

        .meter {
            width: 25px;
            height: 150px;
            display: block;
            margin: 0 auto;
        }

        .table_p {
            line-height: 30px;
            font-size: 18px;
        }

            .table_p span {
                display: block;
                float: left;
                width: 80px;
                font-weight: bold;
                text-align: right;
            }

            .table_p table {
                width: 100%;
                border-collapse: collapse;
                position: absolute;
                text-align: center;
            }

                .table_p table tr {
                    height: 40px;
                }

                .table_p table thead th {
                    color: #61d2f7;
                    font-size: 14px;
                    font-weight: 600;
                    padding-top: 5px;
                    padding-bottom: 5px;
                    text-align: center;
                }

        .menu_btn {
            margin-top: 30px;
            cursor: pointer;
            box-sizing: border-box;
            border: 2px solid red;
            border-image: url(~/Assets/Emergency/img/border.png) 51 38 21 132;
            border-width: 1.125rem 1.583rem 0.875rem 2.5rem;
            width: 100px;
            height: 40px;
            font-size: 14px;
            font-weight: bold;
        }

            .menu_btn a {
                display: block;
                cursor: pointer;
                text-align: center;
            }

        .div-a {
            position: absolute;
        }

        .factory-active {
            color: white;
            font-weight: bold;
        }

            .factory-active:hover {
                color: white;
                font-weight: bold;
            }

        .detail_div {
            background-color: rgba(44,88,106,0.9);
            color: #FFF;
            border-radius: 4px;
            z-index: 999;
            position: fixed;
            width: 300px;
        }

        .detail_text {
            display: none;
            font-size: 17px;
        }

        .menu-active {
            color: white;
            font-weight: bold;
        }

        #triangle-topleft {
            width: 0;
            height: 0;
            border-top: 100px solid black;
            border-right: 100px solid transparent;
        }

        #triangle-topright {
            width: 0;
            height: 0;
            border-top: 100px solid black;
            border-left: 100px solid transparent;
        }

        div::-webkit-scrollbar {
            width: 10px;
            height: 10px;
            /**/
        }

        div::-webkit-scrollbar-track {
            background: rgb(12, 27, 45);
            border-radius: 2px;
        }

        div::-webkit-scrollbar-thumb {
            background: rgb(51,122,183);
            border-radius: 10px;
        }

            div::-webkit-scrollbar-thumb:hover {
                background: #333;
            }

        div::-webkit-scrollbar-corner {
            background: #179a16;
        }
    </style>
</head>
<body style="overflow:hidden;height:100%;" ng-controller="EmergencyController" ng-init=" model={};
      model.FactoryAreaId=1;
      GetAlarmList();
      GetAlarmLocation();GetAlarmChart();GetAlarmChart2();
      GetConfirmAlarmList();">
    <a href="../Emergency/Index" style="background:none;font-size:30px;width:10%;position:absolute; font-size:20px;top:30px;left:10px;"><span class="glyphicon glyphicon-home"></span></a>
    <div class="header">
        <div class="bg_header">
            <div class="header_nav fl t_title">
                系统报警列表
            </div>
        </div>
    </div>

    <div class="data_content">
        <div class="data_main">
            <div class="main_left fl">
                <div class="left_1 t_btn6" style="cursor: pointer;height:920px;">
                    <!--左上边框-->
                    <div class="t_line_box">
                        <i class="t_l_line"></i>
                        <i class="l_t_line"></i>
                    </div>
                    <!--右上边框-->
                    <div class="t_line_box">
                        <i class="t_r_line"></i>
                        <i class="r_t_line"></i>
                    </div>
                    <!--左下边框-->
                    <div class="t_line_box">
                        <i class="l_b_line"></i>
                        <i class="b_l_line"></i>
                    </div>
                    <!--右下边框-->
                    <div class="t_line_box">
                        <i class="r_b_line"></i>
                        <i class="b_r_line"></i>
                    </div>
                    <div class="main_title">
                        <i class="icon-info"></i>
                        未确认报警&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </div>
                    <div class="chart" style="width:100%;">
                        <div class="div_any_child" style="height: 911px; overflow-y:scroll;">
                            <div class="table_p" style="height: 96%;margin-top: 20px;">
                                <table>
                                    <thead>
                                        <tr>
                                            <th>序号</th>
                                            <th>设备名称</th>
                                            <th>内容</th>
                                            <th>时间</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody style="color: hotpink;">
                                        <tr ng-repeat="x in UnConfirmAlarmList" ng-click="GetAlarmDetail(x.ID);">
                                            <td ng-bind="$index+1"></td>
                                            <td ng-bind="x.Env_MnName"></td>
                                            <td ng-bind="x.Env_ConfigName"></td>
                                            <td>{{x.AlarmTime|JSONDate :'yyyy-MM-dd HH:mm:ss'}}</td>
                                            <td><button class="btn btn-primary btn-sm" ng-click="ConfirmAlarm(x.ID);">确认</button></td>
                                        </tr>
                                        <tr ng-show="UnConfirmAlarmList.length==0">
                                            <td colspan="5" style="color:white;">暂无未处理告警</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="main_center fl" style="height:530px;">

                <div class="center_text">
                    <!--左上边框-->
                    <div class="t_line_box">
                        <i class="t_l_line"></i>
                        <i class="l_t_line"></i>
                    </div>
                    <!--右上边框-->
                    <div class="t_line_box">
                        <i class="t_r_line"></i>
                        <i class="r_t_line"></i>
                    </div>
                    <!--左下边框-->
                    <div class="t_line_box">
                        <i class="l_b_line"></i>
                        <i class="b_l_line"></i>
                    </div>
                    <!--右下边框-->
                    <div class="t_line_box">
                        <i class="r_b_line"></i>
                        <i class="b_r_line"></i>
                    </div>
                    <div class="main_title">
                        <span class="glyphicon glyphicon-globe"></span>
                        厂区地图&nbsp;&nbsp;&nbsp;&nbsp;
                    </div>
                    <div class="zhuashou" style="position:absolute;bottom:15px;left:40px; color:white;font-weight:bold;font-size:17px;">
                        <a ng-class="{'factory-active' :model.FactoryAreaId==1}" ng-click="ChangeFactoryByArea(model,1);">浦东</a>&nbsp;&nbsp;
                        <a ng-class="{'factory-active' :model.FactoryAreaId==2}" ng-click="ChangeFactoryByArea(model,2);">大场</a>
                    </div>

                    <div ng-repeat="location in AlarmLocation">
                        <div class="div-a" ng-style="{'left':location.X+'%','top':(location.Y)+'%'}" ng-show="location.FactoryAreaId==model.FactoryAreaId">
                            <div ng-mouseover="doMapMouse('Alarm',location.EnvMnNo)" ng-mouseleave="MouseLeave('Alarm',location.EnvMnNo)" style="color: #FFF;font-size:12px; border-radius:4px;">
                                <a class="titlediv" style="color:gainsboro;" title="{{location.LocationName}}">
                                    <img src="~/Images/Monitor/dangerplace.png" width="30" />
                                </a>
                            </div>
                            <div class="detail_div">
                                <div id="Alarm{{location.EnvMnNo}}" class="detail_text" ng-show="location.EnvMnNo==AlarmDetail.Env_MnNo">
                                    <span style="top: -2px; position: relative;padding:5px;"><span class="glyphicon glyphicon-play"> </span><b>报警位置：</b><span>{{location.LocationName}}</span></span><br />
                                    <p style="top: -2px; position: relative;padding:5px;margin:0px;padding:0px;"><span class="glyphicon glyphicon-play"> </span><b>报警设备：</b><span>{{AlarmDetail.Env_MnName}}</span></p>
                                    <p style="top: -2px; position: relative;padding:5px;margin:0px;padding:0px;"><span class="glyphicon glyphicon-play"> </span><b>报警因子：</b><span>{{AlarmDetail.Env_ConfigName}}</span></p>
                                    <p style="top: -2px; position: relative;padding:5px;margin:0px;padding:0px;"><span class="glyphicon glyphicon-play"> </span><b>报警数值：</b><span>{{AlarmDetail.Values}}</span></p>
                                    <p style="top: -2px; position: relative;padding:5px;margin:0px;padding:0px;"><span class="glyphicon glyphicon-play"> </span><b>报警时间：</b><span>{{AlarmDetail.AlarmTime|JSONDate :'yyyy-MM-dd HH:mm:ss'}}</span></p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <img src="~/Assets/Emergency/img/pvg.png" width="925" ng-show="model.FactoryAreaId==1" ng-cloak />
                    <img src="~/Assets/DashBoard/images/dcArea.jpg" width="925" ng-show="model.FactoryAreaId==2" ng-cloak />
                </div>
            </div>

            <div class="main_right fr">
                <div class="right_1" style="cursor: pointer;height:920px;">
                    <!--左上边框-->
                    <div class="t_line_box">
                        <i class="t_l_line"></i>
                        <i class="l_t_line"></i>
                    </div>
                    <!--右上边框-->
                    <div class="t_line_box">
                        <i class="t_r_line"></i>
                        <i class="r_t_line"></i>
                    </div>
                    <!--左下边框-->
                    <div class="t_line_box">
                        <i class="l_b_line"></i>
                        <i class="b_l_line"></i>
                    </div>
                    <!--右下边框-->
                    <div class="t_line_box">
                        <i class="r_b_line"></i>
                        <i class="b_r_line"></i>
                    </div>
                    <div class="main_title" ng-click="HideMessage();">
                        <i class="icon-info"></i>
                        已确认报警&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </div>
                    <div id="chart_epi" class="echart" style="width:100%;">
                        <div class="div_any_child" style="height: 911px;overflow-y:scroll;">
                            <div class="table_p" style="height:96%;margin-top: 20px;">
                                <table>
                                    <thead>
                                        <tr>
                                            <th>序号</th>
                                            <th>设备名称</th>
                                            <th>内容</th>
                                            <th>时间</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr ng-repeat="x in ConfirmAlarmList" ng-click="GetMessageReport(x.Msg_uuid);GetAlarmDetail(x.ID);">
                                            <td ng-bind="$index+1"></td>
                                            <td ng-bind="x.Env_MnName"></td>
                                            <td ng-bind="x.Env_ConfigName"></td>
                                            <td>{{x.AlarmTime|JSONDate :'yyyy-MM-dd HH:mm'}}</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="data_bottom">
            <div class="bottom_center fl">
                <div class="bottom_2 fl">
                    <!--左上边框-->
                    <div class="t_line_box">
                        <i class="t_l_line"></i>
                        <i class="l_t_line"></i>
                    </div>
                    <!--右上边框-->
                    <div class="t_line_box">
                        <i class="t_r_line"></i>
                        <i class="r_t_line"></i>
                    </div>
                    <!--左下边框-->
                    <div class="t_line_box">
                        <i class="l_b_line"></i>
                        <i class="b_l_line"></i>
                    </div>
                    <!--右下边框-->
                    <div class="t_line_box">
                        <i class="r_b_line"></i>
                        <i class="b_r_line"></i>
                    </div>
                    <div class="main_title">
                        <i class="icon-cogs"></i>
                        报警详细&nbsp;&nbsp;&nbsp;&nbsp;
                    </div>
                    <div id="alarm_detail" class="table_p" style="width:100%;height: 280px;margin-top: 15px; float:left;">
                        <div style="background-color: rgba(18, 78, 216,.2);color: #FFF;font-size:16px; border-radius:4px; margin:20px auto; height:240px; width:90%;">
                            <div><span>厂区：</span><b>{{AlarmDetail.FactoryAreaId|GetAreaName}}</b></div>
                            <div><span>设备：</span><b>{{AlarmDetail.Env_MnName}}</b></div>
                            <div><span>报警因子：</span><b>{{AlarmDetail.Env_ConfigName}}</b></div>
                            <div><span>报警值：</span><b>{{AlarmDetail.Values}}</b></div>
                            <div><span>报警时间：</span><b>{{AlarmDetail.AlarmTime|JSONDate :'yyyy-MM-dd HH:mm:ss'}}</b></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="bottom_center fl" style="margin-left:22px;">
                <div class="bottom_2 fl">
                    <!--左上边框-->
                    <div class="t_line_box">
                        <i class="t_l_line"></i>
                        <i class="l_t_line"></i>
                    </div>
                    <!--右上边框-->
                    <div class="t_line_box">
                        <i class="t_r_line"></i>
                        <i class="r_t_line"></i>
                    </div>
                    <!--左下边框-->
                    <div class="t_line_box">
                        <i class="l_b_line"></i>
                        <i class="b_l_line"></i>
                    </div>
                    <!--右下边框-->
                    <div class="t_line_box">
                        <i class="r_b_line"></i>
                        <i class="b_r_line"></i>
                    </div>
                    <div class="main_title">
                        <span class="glyphicon glyphicon-leaf"></span>报警趋势
                        &nbsp;&nbsp;&nbsp;&nbsp;
                    </div>
                    <div class="lb-box" id="lb-1">
                        <div class="lb-content">
                            <div id="chart_alarm" class="echart fl lb-item active" style="width:100%;height:280px;margin-top: 15px;margin-left:10px; float:left;">

                            </div>
                            <div id="chart_alarm2" class="echart fl lb-item" style="width:100%;height:280px;margin-top: 15px;margin-left:10px; float:left;">

                            </div>
                        </div>
                        <ol class="lb-sign">
                            <li class="active">1</li>
                            <li>2</li>
                        </ol>
                        <div class="lb-ctrl left">＜</div>
                        <div class="lb-ctrl right">＞</div>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <div class="detail_div" style="display:none;top:10px;left:10px;" id="MessageReport">
        <table style="width:100%;" ng-show="MessageReportList.length!=0">
            <thead>
                <tr style="text-align:center;">
                    <td>接收人</td>
                    <td>号码</td>
                    <td>状态</td>
                    <td>时间</td>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="x in MessageReportList">
                    <td>{{x.Name}}</td>
                    <td>{{x.Mobile|HideMobile}}</td>
                    <td>成功</td>
                    <td>{{x.CreateTime|JSONDate :'MM-dd HH:mm'}}</td>
                </tr>
            </tbody>
        </table>
        <p ng-show="MessageReportList.length==0">
            当前报警由值班人员手动确认
        </p>
    </div>
</body>

<script src="~/Assets/Scripts/base/angular.js"></script>
<script type="text/javascript" src="~/Assets/DashBoard/js/jquery.min.js"></script>
<script src="~/Assets/Scripts/libs/bootstrap.min.js"></script>
<script type="text/javascript" src="~/Assets/DashBoard/js/echarts.min.js"></script>
<script src="~/Assets/Emergency/js/lb.js"></script>
<script src="~/Assets/Scripts/pg/Emergency.js"></script>
<script>
    const options = {
        id: 'lb-1',              // 轮播盒ID
        speed: 600,              // 轮播速度(ms)
        delay: 50000,             // 轮播延迟(ms)
        direction: 'left',       // 图片滑动方向
        moniterKeyEvent: true,   // 是否监听键盘事件
        moniterTouchEvent: true  // 是否监听屏幕滑动事件
    }
    const lb = new Lb(options);
    lb.start();
</script>

</html>